package com.fyzk.activity.lottery.jc.football;

import android.support.annotation.NonNull;

/**
 * Created by qinkang on 2018/6/10.
 */

public class SpValueBean implements Comparable<SpValueBean> {
    private String style;
    private Double spValue;

    public SpValueBean(String style, Double spValue) {
        this.style = style;
        this.spValue = spValue;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    public Double getSpValue() {
        return spValue;
    }

    public void setSpValue(Double spValue) {
        this.spValue = spValue;
    }

    @Override
    public int compareTo(@NonNull SpValueBean spValueBean) {
        int i = (int) (this.getSpValue()*100 - spValueBean.getSpValue()*100);
        if (i == 0){
            return this.getStyle().length() - spValueBean.getStyle().length();
        }
        return i;
    }

    @Override
    public String toString() {
        return "SpValueBean{" +
                "style='" + style + '\'' +
                ", spValue=" + spValue +
                '}';
    }
}
